<html>
<head><meta charset="utf-8"><title>raw_ref_op/macros · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html">raw_ref_op/macros</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201476141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201476141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201476141">(Jun 20 2020 at 12:38)</a>:</h4>
<p>Are there any reservations with making <a href="https://github.com/rust-lang/rust/issues/73394">https://github.com/rust-lang/rust/issues/73394</a> const? Since ref-to-raw casts are already const, I think we can just make that part of the same feature gate as the non-const version.</p>



<a name="201476338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201476338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201476338">(Jun 20 2020 at 12:44)</a>:</h4>
<p>The macro doesn't need anything for making it const, the body of the macro is the important part</p>



<a name="201476339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201476339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201476339">(Jun 20 2020 at 12:44)</a>:</h4>
<p>So if the expanded code contains something non-const, then that needs to be made const, yes</p>



<a name="201476581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201476581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201476581">(Jun 20 2020 at 12:52)</a>:</h4>
<p>so basically, we'd just have to allow <code>AddrOf</code> in const if the (normal non-const) feature gate is on?</p>



<a name="201476642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201476642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201476642">(Jun 20 2020 at 12:54)</a>:</h4>
<p>yea</p>



<a name="201527803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201527803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201527803">(Jun 21 2020 at 10:11)</a>:</h4>
<p>lol looks like <span class="user-mention" data-user-id="116118">@Matthew Jasper</span> already did that as part of their initial implementation :)</p>



<a name="201527806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201527806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201527806">(Jun 21 2020 at 10:11)</a>:</h4>
<p>:)</p>



<a name="201527850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/raw_ref_op/macros/near/201527850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/raw_ref_op.2Fmacros.html#201527850">(Jun 21 2020 at 10:12)</a>:</h4>
<p>Well, new things are const unless an error is added for them.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>